<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //    1、Math.floor(Math.random()*(10+1))能够生成0-10的随机数
        let re = Math.floor(Math.random() * (10 + 1))
        console.log(re);
        // 2、取到0-5之间的随机数 再加上 就生成了5-10的随机数
        let re1 = Math.floor(Math.random() * (5 + 1)) + 5
        console.log(re1);
    </script>
</body>

</html>